#include "Form.h"

#include <iostream>

using namespace Utils::GUI;

Form::Form(sf::RenderWindow& window)
	: Control(), window(&window)
{
	Shape = sf::Shape::Rectangle(0, 0, 800, 600, sf::Color(255, 255, 255));
}

bool Form::isWindow()
{
	return true;
}

sf::RenderWindow* Form::getWindow()
{
	return window;
}

void Form::Display()
{
	window->Display();
}

void Form::MouseMove(int x, int y)
{
	bool redraw = false;
	if (ConditionalMouseEnter(x, y))
		redraw = true;
	if (ConditionalMouseLeave(x, y))
		redraw = true;

	if(redraw)
		Draw(true);
}

